<template>
  <!--方案列表-->
  个性化方案：<el-select v-model="caseInfo.caseId" placeholder="33">
    <el-option v-for="(item, index) in caseList"
      :key="index" 
      :value="item.caseId"
      :label="item.label"
    >{{item.label}}
    </el-option>
  </el-select> &nbsp; 
  <el-input
    v-show="caseInfo.showSave || caseInfo.showNew"
    v-model="caseInfo.caseName"
    title="方案名称"
    style="width: 150px"
  ></el-input> &nbsp; 
  <el-button type="" @click="saveCase" v-show="caseInfo.showSave">保存</el-button>
  <el-button type="" @click="addNewCase" v-show="caseInfo.showNew">另存为</el-button>
</template>

<script lang="ts">
  import { defineComponent } from 'vue'
  import { gridCaseManage } from './cus-setting'

  /**
   * 列表的个性化方案
   */
  export default defineComponent({
    name: 'nf-cus-grid',
    props: {
      meta: Object,
      kind: String
    },
    setup(props, context) {

      const {
        caseInfo,
        caseList,
        // 个性化
        addNewCase,
        saveCase,
        delCase,
        getList
      } = gridCaseManage(props)
 
      getList()

      return {
        caseInfo,
        caseList,
        // 个性化
        addNewCase,
        saveCase,
        delCase
      }
    }
  })
</script>